﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Ue.CQRS.Samples.Domain
{
    public interface IEntity
    {
        Guid ID { get; }
    }

    public abstract class Entity : IEntity
    {
        public Entity() : this(Entity.GetNewID()) { }

        public Entity(Guid id)
        {
            this.ID = id;
        }

        public Guid ID { get; private set; }

        public static Guid GetNewID()
        {
            return Guid.NewGuid();
        }
    }
}